Skip to content

[PowerX] power boundary metrics, comparison overlays, point view and timeline / 功耗边界指标、对比叠加、逐点视图与时间线 - #1237

Closed
edwingao28 wants to merge 7 commits into
feat/powerx-db-ingestfrom
feat/powerx-dashboard-views
Closed

edwingao28 wants to merge 7 commits into
feat/powerx-db-ingestfrom
feat/powerx-dashboard-views

Conversation

@edwingao28

@edwingao28 edwingao28 commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #1167 (telemetry persistence). Adds the dashboard views on stored telemetry: four gated power-boundary y-axis metrics with i_pcompare boundary/role comparison overlays, reconstructed prefill/decode energy, i_rulers share-link persistence, a per-point PowerX tab and dialog over /api/v1/gpu-metrics-point, and the measured power timeline. ?unofficialrun= overlays use the same code paths; every UI string has Chinese.

Testing: base tree equals #1167's former head 83924321 (25/25 CI checks). Two review findings fixed on top, each with a component case that fails on the old code: base legend-row hover, timeline memo deps. Follow-ups: split PowerTimeline.tsx; decide whether i_rulers ships here.

中文说明

基于 #1167(遥测持久化)堆叠。新增建立在入库遥测之上的仪表板视图:四个门控的功耗边界 y 轴指标及 i_pcompare 边界/角色对比叠加、重建的 prefill/decode 能耗、i_rulers 分享链接持久化、基于 /api/v1/gpu-metrics-point 的逐点 PowerX 标签页与图表对话框,以及实测功耗时间线。?unofficialrun= 叠加走同一代码路径;所有 UI 字符串均有中文。

测试: 基础代码树与 #1167 此前的 head 83924321 相同(25/25 CI 通过)。在其之上修复两条 review 发现,各附一个旧代码会失败的组件用例:基础图例行悬停、时间线 memo 依赖。后续项:拆分 PowerTimeline.tsx;决定 i_rulers 是否随本 PR 发布。


Note

Medium Risk
Large, cross-cutting inference UI and chart-data changes (new derived metrics, URL params, overlay paths) with complex disagg normalization and async ruler/timeline loading; mostly additive but regressions could affect share links, gated metrics, and overlay charts.

Overview
Brings PowerX article figures into /inference as first-class Measured Energy y-axis metrics and share links, instead of a separate chart stack.

Power boundaries (B2–B4) join existing GPU-measured telemetry: six new registry keys (provisioned TDP/all-in watts and J/out, utility modeled W and J/out) are derived in lib/power-basis.ts via buildDerivedChartFields, gated with Measured Energy, and selected through a Boundary control that only changes i_metric (no i_pbasis). Captions and availability explain missing TDP, throughput, disagg counts, or chassis-model gaps.

i_pcompare=boundaries|roles clones sibling series onto the same axis (other boundaries or prefill/decode pools, including reconstructed prefill J/out for Figure 7); official data, ?unofficialrun= overlays, table/CSV, and ScatterGraph legend/line labels all honor dashed variants and local hide state.

Measured power timeline (y_measuredPowerTimeline, Display → Timeline) replaces the scatter body with PowerTimeline, joining power_audit sources to persisted or artifact gpu-metrics power series (with run prioritization and bundle cuts for disagg).

Share URL state adds i_rulers (provider-owned perf-ruler store with pending commit until curves exist) and documents i_pcompare in state-ownership.

Per-point PowerX: agentic detail Power tab and chart View PowerX dialog load /api/v1/gpu-metrics-point; optional server-metric overlays on the telemetry chart. Overlay line pills now label hardware (✕ B200) rather than branch names. Profit calculator modeled-power admission allows fully measured multi-host topologies when not extrapolating a partial chassis.

Extensive docs (powerx-permanent-view.md, data-transforms power boundaries) and Cypress coverage for compare, timeline, and telemetry interactions.

Reviewed by Cursor Bugbot for commit d10cdd0. Bugbot is set up for automated code reviews on this repo. Configure here.

Add gated power-boundary y-axis metrics (GPU-measured, GPU-provisioned, utility
provisioned, utility modeled), the i_pcompare boundary/role comparison overlays with
per-series line labels, reconstructed prefill/decode energy, and CSV/table plumbing;
overlay runs follow the same paths.

中文:新增门控的功耗边界 y 轴指标(GPU 实测、GPU 配给、市电配给、市电建模)、i_pcompare 边界/角色对比叠加与逐序列线标签、重建的 prefill/decode 能耗及 CSV/表格贯通;非正式 run 叠加走同一路径。
Serialize curve-to-curve perf rulers into the i_rulers URL parameter and restore them on
load; the InferenceContext and url-state wiring lives in the boundary-metrics commit.

中文:把曲线间 perf ruler 序列化到 i_rulers URL 参数并在加载时恢复;InferenceContext 与 url-state 的接线在边界指标提交中。
Open a benchmark point's stored telemetry from the chart tooltip: a PowerX tab on the
agentic detail page and a dialog from the scatter/GPU charts, with per-chip toggles, a
server-metric overlay and loading/error/missing states that keep cached data on a failed
refetch.

中文:从图表 tooltip 打开 benchmark 点的入库遥测:agentic 详情页的 PowerX 标签页与散点/GPU 图的对话框,含逐芯片开关、server 指标叠加,以及刷新失败时保留缓存数据的加载/错误/缺失状态。
Draw the one-second power traces of the drawn runs on a shared time axis, grouped by
pool with reference labels, honoring hardware toggles and unofficial-run overlays.

中文:在共享时间轴上绘制已绘 run 的每秒功耗轨迹,按 pool 分组并带参考标签,遵循硬件开关与非正式 run 叠加。
Document the gated power-boundary metrics and share-link state, the power-basis
derived fields, uniform-host system power modeling, and the dashboard doc index entry.

中文:记录门控的功耗边界指标与分享链接状态、power-basis 派生字段、统一主机的系统功耗建模及 docs 索引条目。
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
inferencemax-app Ready Ready Preview Sep 29, 2026 7:58pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 8m 16s —— View job


PowerX dashboard views review

  • Gather context & read changed files
  • Runtime verification — boundary comparison chart & timeline render, 0 console errors
  • Static review (bugs, logic, edge cases) — 2 🟡 warnings posted inline
  • Test coverage — colocated .test.ts for every new src/lib module + 4 new power .cy.tsx specs ✅
  • Chinese copy check (in progress)
  • Post summary

Comment thread packages/app/src/components/inference/ui/ScatterGraph.tsx
Comment thread packages/app/src/components/inference/ui/PowerTimeline.tsx Outdated
Base points and rooflines carry no power variant (only role and boundary
siblings are cloned), while the base legend row's key holds the base id.
Hovering that row therefore matched nothing and dimmed the whole chart.
Map the empty variant back onto the base id for hover matching, and cover
it with a component case that fails on the old code.

中文:基础系列的点和 roofline 不带 power variant(只有角色/边界的
兄弟系列会被克隆),而基础图例行的 key 带有基础 id,悬停时匹配不到
任何元素,整张图全部变暗。现将空 variant 映射回基础 id 用于悬停匹配,
并新增旧代码会失败的组件测试用例。
The response map spread one query result per run into its useMemo deps, so
the array changed length whenever runs joined or left the plot and React
logged the changed-size warning and recomputed. Build the resolved list in
useQueries' combine, which React Query structurally shares, and memoise the
map on that single input. Loading count and errors move into the same
combine. A component case grows the plot from one run to two and asserts
the warning is gone.

中文:响应 map 之前把每个 run 的查询结果展开进 useMemo 依赖数组,
run 加入或离开图表时数组长度变化,React 会报 changed-size 警告并
重新计算。现改为在 useQueries 的 combine 中构建已解析列表(React Query
会做结构共享),map 只依赖这一个输入;加载计数与错误也移入同一 combine。
新增组件用例:图表从一个 run 增长到两个并断言不再出现该警告。
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 2m 47s —— View job


PowerX dashboard views — re-review

  • Gather context & read changed files
  • Confirm the two prior findings (base legend hover, timeline memo deps) are addressed
  • Static review of new code (bugs, edge cases, hooks)
  • Runtime verification at localhost (0 console errors)
  • CI status
  • Chinese copy check
  • Post summary

Re-review: The only commits since my previous review (2 🟡 findings) are the two fixes for those findings. Both are correctly applied and each ships a regression test that fails on the old code.

1. Base comparison-legend hover (a72b9307) — matchesPoint/roofline matching now normalizes the empty variant back to powerCompareBaseId (powerVariantId(d.powerVariant) || powerCompareBaseId), and powerCompareBaseId was added to the useCallback deps. Matches the suggested fix; the new power-compare.cy.tsx case asserts the base rooflines stay at opacity 1 while siblings dim to 0.15 on hover. ✅

2. Timeline useMemo variable-length deps (d10cdd0c) — the per-query spread is gone; loading count, errors, and the resolved [runId, response] list are now built inside useQueries' combine, and the response map memoizes on the single structurally-shared resolved array. This removes the "final argument…changed size" warning cleanly (a stronger fix than the stable-string-key suggestion). The new power-timeline.cy.tsx case grows the plot 1→2 runs and asserts the warning is gone. ✅

Runtime: homepage and ?i_pcompare=roles both loaded with 0 console errors. Prior review already confirmed the boundary-comparison chart and timeline render real data.

Chinese copy: no new user-visible Chinese strings in the two fix commits (only code + test + commit-body Chinese, which is out of scope).

🟢 Re-review LGTM — both prior findings resolved with tests; no new blocking issues in the delta.

@functionstackx functionstackx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

address feedback from slack

@edwingao28

Copy link
Copy Markdown
Collaborator Author

moved to #1220

This branch was successfully deployed

1 active deployment
Preview — d10cdd0c Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants